#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
    int fd = open("./1.txt",O_RDWR | O_CREAT,0664);
    if(fd < 0)
    {
        perror("open");
        return 0;
    }
    dup2(fd,1);
    printf("i am dup2\n");
    return 0;
}
